package com.ruoyi.ring.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ring.mapper.RingEmotionalInfoMapper;
import com.ruoyi.ring.domain.RingEmotionalInfo;
import com.ruoyi.ring.service.IRingEmotionalInfoService;

/**
 * 压力情绪信息Service业务层处理
 * 
 * @author liuwp
 * @date 2025-09-08
 */
@Service
public class RingEmotionalInfoServiceImpl implements IRingEmotionalInfoService 
{
    @Autowired
    private RingEmotionalInfoMapper ringEmotionalInfoMapper;

    /**
     * 查询压力情绪信息
     * 
     * @param id 压力情绪信息主键
     * @return 压力情绪信息
     */
    @Override
    public RingEmotionalInfo selectRingEmotionalInfoById(Long id)
    {
        return ringEmotionalInfoMapper.selectRingEmotionalInfoById(id);
    }

    /**
     * 查询压力情绪信息列表
     * 
     * @param ringEmotionalInfo 压力情绪信息
     * @return 压力情绪信息
     */
    @Override
    public List<RingEmotionalInfo> selectRingEmotionalInfoList(RingEmotionalInfo ringEmotionalInfo)
    {
        return ringEmotionalInfoMapper.selectRingEmotionalInfoList(ringEmotionalInfo);
    }

    /**
     * 根据业务主键查询一条记录：压力情绪信息
     *
     * @param ringEmotionalInfo 压力情绪信息
     * @return 压力情绪信息
     */
    @Override
    public RingEmotionalInfo selectOneRingEmotionalInfo(RingEmotionalInfo ringEmotionalInfo)
    {
        return ringEmotionalInfoMapper.selectOneRingEmotionalInfo(ringEmotionalInfo);
    }

    /**
     * 新增压力情绪信息
     * 
     * @param ringEmotionalInfo 压力情绪信息
     * @return 结果
     */
    @Override
    public int insertRingEmotionalInfo(RingEmotionalInfo ringEmotionalInfo)
    {
        ringEmotionalInfo.setCreateTime(DateUtils.getNowDate());
        return ringEmotionalInfoMapper.insertRingEmotionalInfo(ringEmotionalInfo);
    }

    /**
     * 修改压力情绪信息
     * 
     * @param ringEmotionalInfo 压力情绪信息
     * @return 结果
     */
    @Override
    public int updateRingEmotionalInfo(RingEmotionalInfo ringEmotionalInfo)
    {
        ringEmotionalInfo.setUpdateTime(DateUtils.getNowDate());
        return ringEmotionalInfoMapper.updateRingEmotionalInfo(ringEmotionalInfo);
    }

    @Override
    public int updateRingEmotionalInfoCondition(RingEmotionalInfo ringEmotionalInfo, RingEmotionalInfo ringEmotionalInfoCondition)
    {
                ringEmotionalInfo.setUpdateTime(DateUtils.getNowDate());
        return ringEmotionalInfoMapper.updateRingEmotionalInfoCondition(ringEmotionalInfo, ringEmotionalInfoCondition);
    }

    /**
     * 批量删除压力情绪信息
     * 
     * @param ids 需要删除的压力情绪信息主键
     * @return 结果
     */
    @Override
    public int deleteRingEmotionalInfoByIds(Long[] ids)
    {
        return ringEmotionalInfoMapper.deleteRingEmotionalInfoByIds(ids);
    }

    /**
     * 删除压力情绪信息信息
     * 
     * @param id 压力情绪信息主键
     * @return 结果
     */
    @Override
    public int deleteRingEmotionalInfoById(Long id)
    {
        return ringEmotionalInfoMapper.deleteRingEmotionalInfoById(id);
    }

    /**
     * 条件删除压力情绪信息
     *
     * @param ringEmotionalInfo 压力情绪信息
     * @return 结果
     */
    @Override
    public int deleteRingEmotionalInfoByCondition(RingEmotionalInfo ringEmotionalInfo)
    {
        return ringEmotionalInfoMapper.deleteRingEmotionalInfoByCondition(ringEmotionalInfo);
    }

}
